home *** CD-ROM | disk | FTP | other *** search
-
-
-
- VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx)))) VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
-
-
-
- NNNNAAAAMMMMEEEE
- VkMenuItem - Abstract base class for all ViewKit menu classes
-
- IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
- VkComponent : VkCallbackObject
-
- HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
- #include <Vk/VkMenuItem.h>
-
-
- PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
- MMMMaaaannnniiiippppuuuullllaaaattttiiiinnnngggg MMMMeeeennnnuuuu IIIItttteeeemmmmssss
- void activate();
- void deactivate();
- int remove();
- void show();
- void hide();
- virtual void setLabel(const char * str);
- void setPosition(int pos);
-
-
-
- AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
- virtual const char* className();
- virtual Boolean isContainer();
-
-
- SSSSUUUUBBBBCCCCLLLLAAAASSSSSSSS PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
- CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
- VkMenuItem( );
- VkMenuItem(const char * itemName);
-
-
- MMMMaaaannnnaaaaggggiiiinnnngggg eeeennnnttttrrrriiiieeeessss
- static void manageAll();
-
-
-
- CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- VkMenuItem is an abstract class that defines the basic behavior of all
- menu objects supported by the ViewKit. There are two types of classes
- derived from VkMenuItem. The first serve as containers. These correspond
- to the menu types supported by Motif: popup menus, pulldown menu panes,
- menubars, and option menus. The second type of derived classes can be
- used as individually selectable items in a menu. These include actions,
- toggles, labels, separators, and so on.
-
- For the most part, the classes derived from VkMenuItem have a direct
- correspondence to a Motif widget. An action (a VkMenuAction object)
- represents an XmPushButton gadget along with an associated callback.
- However, the ViewKit menus offer several advantages over directly using
- Motif widgets. First, all menu items can be manipulated more easily than
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx)))) VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
-
-
-
- widgets. All items can be displayed, activated, or deactivated with a
- single function call. Items can also be moved, or replaced by other
- items easily. For example an action item in a menu pane can be replaced
- by a cascading pulldown menu with a single function call.
-
- The various VkMenuItem classes also hide the somewhat confusing
- organization of Motif cascade and option menus. For example, a menu pane
- is just a type of menu item that can contain other items. The items in a
- menu pane might include actions, toggles, labels, or other menu panes.
- There are not confusing submenu id's to work with.
-
- Menus are also constructed in the most efficient manner possible. Widgets
- within a menu hierarchy are managed in groups in a completely transparent
- way.
-
- VkMenuItem is derived from VkComponent, and follows most of the
- conventions associated with component. However, unlike most components,
- all menu items defer the creation of widgets. When constructing menus,
- objects are instantiated and organized into a hierarchy, but no widgets
- are created. When the menu is to be displayed, applications must call
- the _b_u_i_l_d() member function for the top of the menu hierarchy. This
- creates and manages all widgets at once.
-
- DDDDeeeerrrriiiivvvviiiinnnngggg SSSSuuuubbbbccccllllaaaasssssssseeeessss
- Most common types of menu items are already defined within the ViewKit,
- and it is not recommended that new classes be derived directly from
- VkMenuItem. Various classes derived from VkMenuItem may be candidates
- for further derivation. See the individual derived classes for more
- information.
-
- FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
- sssshhhhoooowwww
- void show(Widget parent);
- void show();
-
-
- Like most components, all menu items are displayed by calling _s_h_o_w()
- at the desired time. For VkMenuItems, _s_h_o_w() works slightly
- differently. Because the construction of the widgets associated with
- menu items is delayed, show may take an argument that specifies the
- parent of the menu hierarchy to be built. It is only necessary to
- call _s_h_o_w() for the top-most object in a menu hierarchy. All other
- objects will be constructed automatically. The parent argument to
- _s_h_o_w() is only effective the first time it is called. Menus cannot
- be reparented after they are constructed.
-
- When called after the menu has been created or with no arguments,
- _s_h_o_w() simply sets the state of an item such that it is, or will be
- visible. By default, all items will be visible when they are first
- constructed. See _h_i_d_e() for more information.
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx)))) VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
-
-
-
- aaaaccccttttiiiivvvvaaaatttteeee
- void activate();
-
-
- Makes an item active so that it accepts input.
-
- ddddeeeeaaaaccccttttiiiivvvvaaaatttteeee
- void deactivate();
-
-
- Make an item inactive so that it cannot be selected. Any item can be
- active or inactive.
-
- rrrreeeemmmmoooovvvveeee
- int remove();
-
-
- Removes the item from the menu hierarchy that contains it. The item
- is not destroyed.
-
- hhhhiiiiddddeeee
- void hide();
-
-
- Marks an item as not visible Calling _h_i_d_e() on a currently visible
- item unmanages the widget associated with the item. Calling _h_i_d_e()
- for an item before the menu has been constructed marks the item so
- that it will not appear when _b_u_i_l_d() is called. Calling _s_h_o_w()
- reverses the effects of _h_i_d_e().
-
- sssseeeettttLLLLaaaabbbbeeeellll
- virtual void setLabel(const char *str);
-
-
- It is sometimes necessary to programmatically set the label of an
- item. (Generally labels are retrieved from the item's
- XmNlabelString resource in the resource database.) This function
- allows labels to be set programmatically, without losing the ability
- to set labels in the resource file. The given string is treated as
- the name of a resource to be retrieved from the resource database.
- If no such resource is found, the string is treated as the actual
- label to be displayed.
-
- sssseeeettttPPPPoooossssiiiittttiiiioooonnnn
- void setPosition(int pos);
-
- Specify a specific position within a menu pane or menubar at which this
- item should appear.
-
- ccccllllaaaassssssssNNNNaaaammmmeeee
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx)))) VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
-
-
-
- virtual const char* className();
-
-
- The class name of this class is "VkMenuItem".
-
- iiiissssCCCCoooonnnnttttaaaaiiiinnnneeeerrrr
- virtual Boolean isContainer();
-
-
- This function returns TRUE if an object is one of the container
- types of menu items.
-
- VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm
- VkMenuItem();
- VkMenuItem(const char* itemName);
-
-
- Initialize the data members of a VkMenuItem object.
-
- ~~~~VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm
- ~VkMenuItem();
-
-
- Frees all memory associated with a VkMenuItem object. If the object
- is a member of a menu, the object is removed from that menu.
-
- mmmmaaaannnnaaaaggggeeeeAAAAllllllll
- static void manageAll();
-
-
-
-
- IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
- installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
- setDefaultResources(), getResources(), manage(), unmanage(),
- baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
-
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
- callCallbacks(), addCallback(), removeCallback(),
- removeAllCallbacks()
-
-
-
- KKKKNNNNOOOOWWWWNNNN DDDDEEEERRRRIIIIVVVVEEEEDDDD CCCCLLLLAAAASSSSSSSSEEEESSSS
- VkMenuAction, VkMenuConfirmFirstAction, VkMenuActionObject,
- VkMenuActionWidget, VkMenuToggle, VkMenuUndoManager, VkMenuLabel,
- VkMenuSeparator, VkMenu, VkOptionMenu, VkSubMenu, VkHelpPane,
- VkRadioSubMenu, VkMenuBar VkPopupMenu,
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx)))) VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm((((3333xxxx))))
-
-
-
- CCCCLLLLAAAASSSSSSSSEEEESSSS UUUUSSSSEEEEDDDD BBBBYYYY TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
- VkMenu
-
- KKKKNNNNOOOOWWWWNNNN CCCCLLLLAAAASSSSSSSSEEEESSSS TTTTHHHHAAAATTTT UUUUSSSSEEEE TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
- VkGraph, VkMenu, VkMenuBar, VkMenuItem, VkMenuUndoManager, VkOptionMenu,
- VkPopupMenu, VkSubMenu, VkWindow
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- VkComponent, VkGraph, VkMenu, VkMenuBar, VkMenuUndoManager, VkOptionMenu,
- VkPopupMenu, VkSubMenu, VkWindow
- _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
- _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
- _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
- _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-